#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<cstdio>

using namespace std;

int main()
{
    int A, B, C, a, b, c, temp;
    cin >> A >> B >> C;
    a = A;
    b = B;
    c = C;
    if (a > b)
    {
        temp = a;
        a = b;
        b = temp;
    }
    if (b > c)
    {
        temp = b;
        b = c;
        c = temp;
    }
    if (a > b)
    {
        temp = a;
        a = b;
        b = temp;
    }
    printf("%d\n%d\n%d\n", a, b, c);
    cout << endl;
    printf("%d\n%d\n%d\n", A, B, C);
    return 0;
}
